<!--
 * @Author: linZeJian
 * @Date: 2022-08-24 10:53:55
 * @LastEditors: linZeJian
 * @LastEditTime: 2022-08-26 14:28:53
 * @Description:
-->
<template>
  <div v-if="column.display">

    <van-field
            name="IsLeader"
            label="是否领队"
            class="user-filed1"
            clickable
            label-width="80"
            placeholder="请填写"
    >
      <template #input>
        <div class="cost-num">
          <span>{{ modelValue ? "是" : "否" }}</span>
        </div>
      </template>
      <template #right-icon>
        <div
        >
          <van-switch
                  v-model="currentValue"
                  size="30px"
          />
        </div>
      </template>
    </van-field>

  </div>
</template>

<script>
export default {
  name: "avant-switch",
  props: ['column','modelValue'],
  inject: ['getViewFormData'],
  data() {
    return {
      currentValue:""
    };
  },
  mounted(){
    if( this.getViewFormData){
      this.formData = this.getViewFormData()
    }
  },
  watch: {
    currentValue(newVal) {
      this.$emit('update:modelValue', newVal);
    },
    modelValue(newVal) {
      this.currentValue = newVal;
    }
  },
  created() {},
  methods: {},
};
</script>

<style lang="scss" scoped>

</style>
